import request from '@/utils/request'

// openid绑定主播
export function BindMemberCode(data = {}) {
  return request({
    url: '/member/bindMemberCode',
    method: 'post',
    data
  })
}

// 获取主播列表
export function GetClientAnchorList(params = {}) {
  return request({
    url: '/apid/getClientAnchorList',
    method: 'get',
    params
  })
}

// 获取主播相册
export function GetClientAnchorInfo(params = {}) {
  return request({
    url: '/apid/getClientAnchorAlbumList',
    method: 'get',
    params
  })
}

// 账号注册
export function UserRegister(data = {}) {
  return request({
    url: '/client/register',
    method: 'post',
    data
  })
}

// 用户登录
export function UserLogin(data = {}) {
  return request({
    url: '/client/login',
    method: 'post',
    data
  })
}

// 根据订单号 获取订单详情
// tradeNo
export function GetOrderInfoByTradeNo(params = {}) {
  return request({
    url: '/apid/getOrderInfo',
    method: 'get',
    params
  })
}

export function GetOrderInfoByTradeNoTo(data = {}) {
  return request({
    url: '/system/order/getOrderInfoByTradeNo',
    method: 'post',
    data
  })
}

// 微信支付获取openid
export function GetOpenid(params = {}) {
  return request({
    url: '/apid/getWxOpenId',
    method: 'get',
    params
  })
}

// 微信支付 创建订单
export function CreatePayOrder(data = {}) {
  return request({
    url: '/apid/getPrepayInfo',
    method: 'post',
    data
  })
}
